<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/16
 * Time: 18:53
 */
class  DB
{
    private  static $Obj=null;
    private  function  __construct()
    {

    }
    static  function  getObj()
    {
    if (is_null(self::$Obj))
    {
        self::$Obj=new DB();
    }
    return self::Obj;
    }
}


var_dump(DB::getObj());
var_dump(DB::getObj());
